<template>
  <view class="">
    <button @click="remove">删除</button>
    <button @click="clear" type="warn">清除缓存</button>
  </view>
</template>

<script setup>
  import { ref, computed } from 'vue'

  uni.setStorageSync('name', '张三')
  uni.setStorageSync('arrs', [1, 2, 3])

  let myName = uni.getStorageSync('name') || '匿名'
  console.log(myName)

  let res = uni.getStorageInfoSync()
  console.log(res)

  const remove = () => {
    uni.removeStorageSync('arrs')
  }

  const clear = () => {
    uni.clearStorageSync()
  }
</script>

<style lang="scss">

</style>